using System;
using UnityEngine;

public class HinderWidgetHandler : MonoBehaviour
{
	public void SetData(bool _isUp, int _tangramIndex)
	{
		this.isUp = _isUp;
		if (GameMode.gameMode == GameType.TRIANGLE)
		{
			this.sprite.spriteName = ((!this.isUp) ? "bloker_triangle_1" : "bloker_triangle_0");
		}
		else if (GameMode.gameMode == GameType.SQUARE)
		{
			this.sprite.spriteName = "bloker_square";
		}
		else if (GameMode.gameMode == GameType.HEXA)
		{
			this.sprite.spriteName = "bloker_hexa_wood";
		}
		else if (GameMode.gameMode == GameType.RHOMBUS)
		{
			this.sprite.spriteName = "bloker_rhombus";
		}
		else if (GameMode.gameMode == GameType.TANGRAM)
		{
			this.sprite.spriteName = string.Format("bloker_tangram_{0}", _tangramIndex);
		}
		this.SetMesh();
	}

	private void SetMesh()
	{
		this.ren.material.SetFloat("_OriginColor", 1f);
		this.ren.material.SetFloat("_MultiColor", 0f);
	}

	public Renderer ren;

	public tk2dSprite sprite;

	public bool isUp;
}
